Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

321
Visualizações
How to add "1+More" tag button in jquery autocomplete?

I have added jquery autocomplete in my website search box for the locations. I am able to achieve multiple autocomplete search suggestions in the box but it looks not user friendly as all the suggestions are displayed with the box. I want 1 or 2 suggestions and rest all will be under the tag button called: "1+ More". I have attached the desired output and what I have right now.

Javascript code used:

<script type="text/javascript">
    $(function(){
        $.getJSON("<?php echo base_url();?>package.json", function(data) {
        
        autoComplete = [];
        for (var i = 0, len = data.length; i < len; i++) {
            autoComplete.push(data[i]);
        }
        $('#myAutocompleteMultiple').autocomplete({
            source: autoComplete,
            multiselect: true,
            
        });
    });
</script>

and html used:

<input id="myAutocompleteMultiple" type="text" placeholder="Search Location"/>

Json file content:

[
    "Al Barari Commercial",
    "Al Quoz Commercial",
    "Al Qusais Commercial",
    "Arjan Commercial",
    "Bur Dubai Commercial"
]

Please anyone help me.

desired output

current output

Thank you.

about 4 years ago · Santiago Gelvez
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda